package com.jiashihui.schema_lgorithm.exception;

/**
 * 异常类
 */
public class AncbException extends Exception {
    private static final long serialVersionUID = 9161453914988351031L;

    /**
     * 错误码
     */
    private String code;

    /**
     * 构造异常
     *  @param code 异常状态码
     * @param msg  异常讯息
     */
    public AncbException(String code, String msg) {
        super(msg);
        this.code = code;
    }

    /**
     * 构造异常
     *  @param code 异常状态码
     * @param ex   异常来源
     */
    public AncbException(String code, Exception ex) {
        super(ex);
        this.code = code;
    }

    /**
     * @return 异常状态码
     */
    public String getErrorCode() {
        return code;
    }

}
